{extend name="base" /} {block name="body"}
<div class="layui-body">
	<div class="navbar">
		<a><cite>系统设置</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href=""><cite>管理员</cite></a>
	</div>
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<blockquote class="layui-elem-quote">
			<div class="layui-inline">
				<div class="layui-input-inline">
					<input type="text" placeholder="请输入关键字" class="layui-input">
				</div>
				<a class="layui-btn search_btn"><i class="fa fa-search"></i> 查询</a>
				<a class="layui-btn layui-btn-normal" href="{:url('add')}"><i class="fa fa-plus-circle"></i> 添加</a>
				<a class="layui-btn layui-btn-status page-btns" href="{:url('status',['table'=>'user','val'=>1])}"><i class="fa fa-check-circle-o"></i> 启用</a>
				<a class="layui-btn layui-btn-danger page-btns" href="{:url('status',['table'=>'user','val'=>2])}"><i class="fa fa-ban"></i> 禁用</a>
				<a class="layui-btn layui-btn-error page-btns confirm" href="{:url('delete')}"><i class="fa fa-trash-o"></i> 删除</a>
			</div>
		</blockquote>
		<div class="layui-tab-content">
			<table class="layui-table layui-form">
				<thead>
					<tr>
						<th style="width: 30px;">
							<input type="checkbox" lay-skin="primary" lay-filter="allChoose">
						</th>
						<th>用户名</th>
						<th>用户组</th>
						<th>状态</th>
						<th>创建时间</th>
						<th>最后登录时间</th>
						<th>最后登录IP</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<form id="listForm">
						{foreach name="user_list" item="vo"}
						<tr>
							<td>
								<input type="checkbox" name="ids[]" value="{$vo.id}" class="layui-checkbox checkbox-ids" lay-skin="primary">
							</td>
							<td>{$vo.login_name}</td>
							<td>{$vo.title}</td>
							<td>
								<input type="checkbox" data-href="{:url('status',['table'=>'user','id'=>$vo.id])}" {if $vo.status==1}checked{/if} value="{$vo.status}" lay-skin="switch" lay-filter="switchStatus" lay-text="正常|禁用">
							</td>
							<td>{$vo.add_time}</td>
							<td>{:date('Y-m-d H:i:s', $vo.last_login_time)}</td>
							<td>{$vo.last_login_ip}</td>
							<td>
								<a href="{:url('update',['id'=>$vo.id])}" class="layui-btn layui-btn-small"><i class="fa fa-edit"></i> 编辑</a>
								<a href="{:url('delete',['id'=>$vo.id])}" class="layui-btn layui-btn-error layui-btn-small ajax-do"><i class="fa fa-trash-o"></i> 删除</a>
							</td>
						</tr>
						{/foreach}
					</form>
				</tbody>
			</table>
			{$user_list->render()}
		</div>
	</div>
</div>
{/block}